package net.hn.hnms.biz.safety.trinity.group.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.hn.hnms.biz.safety.trinity.group.domain.RiskControlListPo;
import net.hn.hnms.biz.safety.trinity.group.domain.dto.NameAndIntegerDto;
import net.hn.hnms.biz.safety.trinity.group.domain.dto.RiskListDto;
import net.hn.hnms.biz.safety.trinity.group.domain.vo.RiskListVo;
import net.hn.hnms.sys.common.mybatis.core.page.PageQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 风险表mapper
 * @title: RiskControlListMapper
 * @description:
 * @create 2022-03-08 16:01
 */
public interface RiskControlListMapper extends BaseMapper<RiskControlListPo> {
    /**
     * 分页查询
     * @param pageQuery
     * @param riskListDto
     * @return
     */
    List<RiskListVo> selectListPage(@Param("pageQuery") PageQuery pageQuery, @Param("riskListDto") RiskListDto riskListDto);

    List<NameAndIntegerDto> riskCountByRiskLevel(@Param("companyCode") String companyCode, @Param("mineCode") String mineCode);

    Integer selectRiskAllCount(@Param("companyCode") String companyCode, @Param("mineCode") String mineCode);

    /**
     * 根据辨识类型查询数量
     * @param companyCode
     * @param mineCode
     * @param identificationType
     * @return
     */
    Integer selectRiskIdentifyTypeCount(@Param("companyCode") String companyCode, @Param("mineCode") String mineCode, @Param("identificationType") String identificationType);
}
